package main.java.design.strategy;

/**
 * <p></p>
 *
 * @author : wangdejian
 * @version 1.0
 * @date : 2020/6/17 22:02
 */
public class ContextStrategy {

    private ICashSuper cashSuper;


    public ContextStrategy(ICashSuper cashSuper) {
        this.cashSuper = cashSuper;
    }

    public double  contextInterface(double money) {
        System.out.println(this.cashSuper.getClass().getSimpleName() + ":" + cashSuper.acceptCash(money));
        return cashSuper.acceptCash(money);
    }
}
